package com.city.domain.party;

import javax.persistence.*;
import java.util.Objects;

/**
 * @deprecation: 党组织关系转接
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Entity
@Table(name = "party_orelationship", schema = "city", catalog = "")

public class PartyOrelationship {
    private Integer id;//主键
    private String name;//姓名
    private String sourceBranch;//原所在党支部
    private String tciBranch;//需要转入的党支部
    private String branchPaymentTime;//党费已经缴纳的时间
    private String tellphone;//手机号
    private String reason;//转接原因
    private int status;//当前状态
    private int userId;//用户id
    private String time;//申请时间
    private String updateTime;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "source_branch")
    public String getSourceBranch() {
        return sourceBranch;
    }

    public void setSourceBranch(String sourceBranch) {
        this.sourceBranch = sourceBranch;
    }

    @Basic
    @Column(name = "tci_branch")
    public String getTciBranch() {
        return tciBranch;
    }

    public void setTciBranch(String tciBranch) {
        this.tciBranch = tciBranch;
    }

    @Basic
    @Column(name = "branch_payment_time")
    public String getBranchPaymentTime() {
        return branchPaymentTime;
    }

    public void setBranchPaymentTime(String branchPaymentTime) {
        this.branchPaymentTime = branchPaymentTime;
    }

    @Basic
    @Column(name = "tellphone")
    public String getTellphone() {
        return tellphone;
    }

    public void setTellphone(String tellphone) {
        this.tellphone = tellphone;
    }

    @Basic
    @Column(name = "reason")
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Basic
    @Column(name = "status")
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Basic
    @Column(name = "user_id")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "time")
    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Basic
    @Column(name = "update_time")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PartyOrelationship that = (PartyOrelationship) o;
        return id == that.id &&
                branchPaymentTime == that.branchPaymentTime &&
                status == that.status &&
                userId == that.userId &&
                Objects.equals(name, that.name) &&
                Objects.equals(sourceBranch, that.sourceBranch) &&
                Objects.equals(tciBranch, that.tciBranch) &&
                Objects.equals(tellphone, that.tellphone) &&
                Objects.equals(reason, that.reason) &&
                Objects.equals(time, that.time) &&
                Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, name, sourceBranch, tciBranch, branchPaymentTime, tellphone, reason, status, userId, time, updateTime);
    }
}
